import request from "@/utils/request";

export function getGroupList(params) {
  return request({
    url: `/individual/getGroupList`,
    method: "get",
    params,
  });
}

export function getGradeList(params) {
  return request({
    url: `/individual/getGradeList`,
    method: "get",
    params,
  });
}

export function getWordList(params) {
  return request({
    url: `/individual/getWordList`,
    method: "get",
    params,
  });
}

export function addStudentWord(data) {
  return request({
    url: `/individual/addStudentWord`,
    method: "post",
    data,
  });
}

export function addToStrange(data) {
  return request({
    url: `/word/word/addToStrange`,
    method: "post",
    data,
  });
}

export function getStudentWordList(data) {
  return request({
    url: `/individual/getStudentWordList`,
    method: "post",
    data,
  });
}

export function deleteStudentWord(data) {
  return request({
    url: `/individual/deleteStudentWord`,
    method: "post",
    data,
  });
}

export function getIndividualArticleQuestion(groupId) {
  return request({
    url: `/individual/getIndividualArticleQuestion/${groupId}`,
    method: "get",
  });
}

export function create(data) {
  return request({
    url: `/individual/create`,
    method: "post",
    data,
  });
}

export function groupUnit(gradeId) {
  return request({
    url: `/individual/groupUnit/${gradeId}`,
    method: "get",
  });
}

export function findWordPronunciationVo(params) {
  return request({
    url: `/individual/findWordPronunciationVo`,
    method: "get",
    params
  });
}

export function updateWordStatus(params) {
  return request({
    url: `/individual/updateWordStatus`,
    method: "get",
    params
  });
}

export function createInvidualizedWord(data) {
  return request({
    url: `/individual/createInvidualizedWord`,
    method: "post",
    data
  });
}

export function wordSearch(data) {
  return request({
    url: `/individual/wordSearch`,
    method: "post",
    data
  });
}

export function wordExercise(params) {
  return request({
    url: `/individual/wordExercise`,
    method: "get",
    params
  });
}

export function pass(data) {
  return request({
    url: `/individual/word/pass`,
    method: "post",
    data
  });
}

// 加入收藏
export function addStudentCollectionQuestion(data) {
  return request({
    url: `/article/test/addStudentCollectionQuestion`,
    method: "post",
    data
  });
}

// 删除收藏
export function deleteStudentCollectionQuestion(data) {
  return request({
    url: `/article/test/deleteStudentCollectionQuestion`,
    method: "post",
    data
  });
}

// 获取收藏题目
export function studentCollection(data) {
  return request({
    url: `/studentCollection/create`,
    method: "post",
    data
  });
}

// 阅读校验
export function individualVerifyReadPaper(data) {
  return request({
    url: `/individual/check`,
    method: "post",
    data,
  });
}

// 获取水平测试的分数和正确数错误数
export function getIndividualTestQuestion(groupId) {
  return request({
    url: `/individual/getIndividualTestQuestion/${groupId}`,
    method: "get",
  });
}